/*
 *  Copyright (C) 2010 Jonathan MERCIER <bioinfornatics@fedoraproject.org>,
 *  Louise-Amélie SCHMITT <louise-amelie.schmitt@etu.u-bordeaux1.fr>,
 *  Florence Maurier <florence_maurier@orange.fr>,
 *  Marianne Dussart <marianne.dussart@orange.fr>,
 *  Nicolas Fontaine <nifontaine@gmail.com>
 *
 *  JACoMode is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  JACoMode is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with JACoMode.  If not, see <http://www.gnu.org/licenses/>.
 */
package fr.ubdx1.jacomode.view;

import java.util.ArrayList;
/**
 *
 * @author mdussart
 */
public class DropDown_list {
    private String list;

    /**
     * Process dropDown_list for OverallResult
     * @param molecule
     * @param title
     * @param name
     * @return list
     */
    public String list_molecules(ArrayList molecule, String title, String name){
        list = "<select name='"+name+"' id='"+name+"'>";
        list = list+"<option value=''>"+title+"</option>";

        for (int i = 0; i<molecule.size(); i++)
            	list = list+"<option value="+molecule.get(i)+">"+molecule.get(i)+"</option>";
        list = list+"</select>";
        return list;
    }
}
